//用户信息的数据管理   集中状态管理工具 用来管理需要共享的数据
import { defineStore } from "pinia";
import { ref } from "vue";

export let productStore = defineStore("productStore", () => {
  const productList = ref([]);
  const inquiryInfo = ref({
    sellerName: "",
    sellerId: "",
    customerContactPeople: "",
    customerContactNumber: "",
    customerName: "",
    status: ""
  });

  function clear() {
    productList.value = [];
  }
  function reset() {
    inquiryInfo.value = {
      sellerName: "",
      sellerId: "",
      customerContactPeople: "",
      customerContactNumber: "",
      customerName: "",
      status: ""
    };
  }
  return { productList, clear, inquiryInfo, reset };
});
